<%@ include file="/WEB-INF/webCommon/webCommon.jsp"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
    <title>学院</title>
    <%--  <script type="text/javascript" src="<%=basePath %>js/SysCollegeList.js"></script> --%>
  </head> 
<body class="childrenBody">
<blockquote class="layui-elem-quote quoteBox">
		<form class="layui-form">
			<div class="layui-inline">
				<div class="layui-input-inline">
					<input type="text" class="layui-input searchVal" placeholder="请输入搜索的内容" />
				</div>
				<a class="layui-btn search_btn" data-type="reload">搜索</a>
			</div>
			<div class="layui-inline">
				<a class="layui-btn layui-btn-normal addNews_btn">添加学院</a>
			</div>
			<div class="layui-inline">
				<a class="layui-btn layui-btn-danger layui-btn-normal delAll_btn">批量删除</a>
			</div>
		</form>
	</blockquote>
	
	
<table id="SysCollegeList" lay-filter="test"></table>
 
<script>
layui.use('table', function(){
  var table = layui.table;
  
  //第一个实例
  table.render({
   elem: '#SysCollegeList',
        url : 'come/SysCollege_sysMarjorsActionJSON.action',
        //url : './json/newsList.json',
        cellMinWidth : 95,
        page : true,
        height : "full-125",
        method : 'post',
        limits : [10,15,20,25],
        id : "newsListTable",
        cols : [[
            {type: "checkbox", fixed:"left", width:50},
            {field: 'id', title: 'ID', width:60, align:"center"},
            {field: 'collegeName', title: '学院名称', width:350,align:"center"},
            {field: 'collegeId', title: '学院id', width:350,align:"center"},
            {title: '操作', width:170, templet:'#caozuoBar',fixed:"right",align:"center"}
        ]]
  });
  
});
</script>
	<table id="SysCollegeList" lay-filter="SysCollegeList" ></table>
	<!--审核状态-->
	<script type="text/html" id="newsStatus">
		{{#  if(d.newsStatus == "1"){ }}
		<span class="layui-red">等待审核</span>
		{{#  } else if(d.newsStatus == "0"){ }}
		<span class="layui-blue">已存草稿</span>
		{{#  } else { }}
			审核通过
		{{#  }}}
	</script>
<!--操作-->
	<script type="text/html" id="caozuoBar">
		<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
		<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
		<a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="look">预览</a>
	</script>
</body>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  <%-- 
    <div class="layui-row">
    <div id="" class="">
      <div id="" class="">
     	<form action="<%= basePath%>/come/SysCollege_openList.action" method="post"  target="rightFrame">
    	<ul class="seachform">
    	 <p:permissions right="queryUser" >
    	    <li><label>综合查询</label></li>
    	    <li><input type="text" name="collegeName" lay-verify="collegeName" autocomplete="off" placeholder="学院名称" class="layui-input"></li>
            <li><button class="layui-btn" lay-filter="chaxu" lay-submit=""/><i class="layui-icon">&#xe615;</i>查询</li>
         </p:permissions>
            <p:permissions right="addUser" >
           	 	<span><a href="<%= basePath%>/come/SysCollege_openAdd.action" class="layui-btn" ><i class="layui-icon">&#xe608;</i>添加</a></span>
            </p:permissions>
        </ul>
        </form> 
    <table class="layui-table">
    	<thead>
    	<tr>
        <th><input name="" type="checkbox" value="" checked="checked"/></th>
        <th>序号<i class=""><img src="" /></i></th>
		<th>学院名称</th>					
        <p:permissions menu="deleteUser,editUser">
        <th>操作</th>
        </p:permissions>
        </tr>
        </thead>
        <tbody>
        <s:iterator value="pageResult.data">
        <tr>
        <td><input name="" type="checkbox" value="" /></td>
        <td>${id }</td>
	    <td>${collegeName }</td>
        <p:permissions menu="deleteUser,editUser">
        <td>
        	<p:permissions right="deleteUser">
	     		<a href="javascript:;" class="tablelinkdelete"   id_value="${id}">  
	     		<button class="layui-btn layui-btn-small">
   						 <i class="layui-icon">&#xe640;</i>
 				 </button> </a>&nbsp;&nbsp;
	     	</p:permissions>
	     	<p:permissions right="editUser">
	        	<a href="<%= basePath%>/come/SysCollege_openEdit.action?collegeId=${collegeId}">
	        	<button class="layui-btn layui-btn-small">
                  <i class="layui-icon">&#xe642;</i>
                </button>
                </a>
	        </p:permissions>
        </td>
        </p:permissions>
        
        </tr> 
        </s:iterator>
        </tbody>
    </table>
    
  </div>  
       
	</div>
    
<!-- 分页菜单组件--------------------------开始 -->    
<div id="test1"></div>
 
<script src="<%=basePath %>/js/layui.js"></script>
<script>
layui.use('laypage','layer' function(){
  var laypage = layui.laypage;
  var layer = layui.layer;
  //执行一个laypage实例
  laypage.render({ 
    elem: 'test1' //注意，这里的 test1 是 ID，不用加 # 号
    ,count: ${pageResult.total} //数据总数，从服务端得到
    ,limit: ${pageResult.page}    //每页显示的条数。laypage将会借助 count 和 limit 计算出分页数。
 //   ,limits:    //每页条数的选择项。如果 layout 参数开启了 limit，则会出现每页条数的select选择框
    ,curr:          //起始页。一般用于刷新类型的跳页以及HASH跳页。
    ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
    ,jump: function(obj, first){
    //obj包含了当前分页的所有参数，比如：
    console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
    console.log(obj.limit); //得到每页显示的条数
    
    //首次不执行
    if(!first){
      //do something
      
    }
  });
});
</script> --%>
    
    
<!-- 分页菜单组件--------------------------结束 -->

	
</html>
